home *** CD-ROM | disk | FTP | other *** search
- Path: news.mindspring.com!usenet
- From: tbreyman@mindspring.com (Todd M. Breyman)
- Newsgroups: comp.lang.c
- Subject: Rounding routine for doubles
- Date: Thu, 14 Mar 1996 21:18:23 GMT
- Organization: MindSpring Enterprises
- Message-ID: <31488c47.27813811@news.mindspring.com>
- NNTP-Posting-Host: user-168-121-80-158.dialup.mindspring.com
- X-Newsreader: Forte Agent .99d/32.182
-
- I am trying to put together an algorithm to round doubles. The
- function I am writing looks like...
-
- double dRound (double dValue, short iPrecision)
-
- where the function returns dValue rounded to iPrecision places. No
- matter what approach I take, I am having difficulty rounding
- 100.00000005 to 8 places. Any ideas?
-